<?php

function greengar_get_following($userid, $app, $following = TRUE) {
    $relationship = greengar_get_relationship_following($app, $following);
    $options = array(
        'relationship' => $relationship,
        'relationship_guid' => $userid,
        'inverse_relationship' => FALSE,
        'types' => 'user',
        'subtypes' => $subtype,
        'limit' => 10000
    );
    $entities = elgg_get_entities_from_relationship($options);
    return $entities;
}

function greengar_get_following_reverse($userid, $app, $following = TRUE) {
    $relationship = greengar_get_relationship_following($app, $following);
    $options = array(
        'relationship' => $relationship,
        'relationship_guid' => $userid,
        'inverse_relationship' => TRUE,
        'types' => 'user',
        'subtypes' => $subtype,
        'limit' => 10000
    );
    $entities = elgg_get_entities_from_relationship($options);
    return $entities;
}

?>
